package org.jeecg.codegeneweb.mock;

import lombok.Data;
import org.jeecg.codegeneweb.domian.column.*;
import org.jeecg.codegeneweb.enumtype.EnumModelType;
import org.jeecg.codegeneweb.vo.TableVoDomain;
import org.jeecg.codegeneweb.vo.WebModelVo;

import java.util.UUID;

@Data
public class OneMockWebModelVo {
    public static WebModelVo initWo() throws Exception{
        WebModelVo wm = initWebModel();
        setWebModelWithoutTree(wm);
        return wm;
    }
    private static WebModelVo initWebModel() throws Exception {
        WebModelVo wm=new WebModelVo();
        wm = WebModelVo.builder()
                .codefromClientGUID(UUID.randomUUID().toString())
                .destinationOutPutDir("D:\\\\eclipse2018-workspace\\\\jeecg-boot\\\\singletable")//感觉没有用
                .servicename("service")//感觉没有用
                .jformType("1")//感觉没有用
                .packageName("qingjiadan")
                .modeltype(EnumModelType.ONE)//用于判断进行one的buildmap中
                .build();
        return wm;
    }
    private static void setWebModelWithoutTree(WebModelVo wm) {


        TableVoDomain singletable = new TableVoDomain();
        singletable.setScroll(1);
        singletable.setFormTemplate("1");
        singletable.setTableTxt("请假单");
        singletable.setTableName("qingjia_dan");
        singletable.setEntityName("QingjiaDan");


        /*//下面是树的设置
        singletable.setIsTree("Y");//如果不是树，为N
        singletable.setTreeFieldname("type_name");////如果不是树，为null
        singletable.setTreeIdField("has_child");//如果不是树，为null
        singletable.setTreeParentIdField("pid");//如果不是树，为null
        *///((SingleTableVoDomain)singletable).setTreeParentIdField("pid");//如果不是树，为null



        setpkid(singletable,1);
        setcreateby(singletable,2);
        setCreatTime(singletable, 3);
        setUpdateBy(singletable, 4);
        setUpdatetime(singletable, 5);
        setupSysorgCode(singletable,6);
        //业务字段
        set请假人(singletable,7);
        set性别(singletable,8);
        set年龄(singletable,9);
        set请假原因(singletable,10);
        set请假天数(singletable,11);
        set开始时间(singletable,12);
        set结束时间(singletable,13);


//
//        setupproductName(singletable,7);
//        setupprice(singletable,8);
//        setupoutfactoryDate(singletable,9);
//        setupproductintroduction(singletable,10);
//        setupproductType(singletable,11);
        wm.setTableVoDomain(singletable);


    }

    private static void set结束时间(TableVoDomain singletable, int orderNum) {
        //设置dbParent
        DbVo dbParent=DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("end_date")
                .dbFieldTxt("结束时间")
                .dbType("Date")
                .dbLength(120)
                .dbIsNull(1)
                .build();
        PageVo pageVoParent=PageVo.builder()
                .isShowForm(1)
                .isReadOnly(0)
                .isQuery(0)
                .isShowList(1)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("date")
                .orderNum(orderNum)
                .build();
        ValidateVo validateParent=ValidateVo.builder()
                .fieldHref("")

                .build();
        ForeignKeyVo foreignKeyVoParent=ForeignKeyVo.builder()
                .build();
        IndexVo indexVocolumnParent=IndexVo.builder()
                .build();
        SearchVo searchVocolumnParent=SearchVo.builder()
                .build();

        ColumnVoDomain columnParent = ColumnVoDomain.builder()
                .dbVo(dbParent)
                .pageVo(pageVoParent)
                .validateVo(validateParent)
                .foreignKeyVo(foreignKeyVoParent)
                .indexVo(indexVocolumnParent)
                .searchVo(searchVocolumnParent)
                .build();
        singletable.getColumnVoDomainList().add(columnParent);
    }

    private static void set开始时间(TableVoDomain singletable, int orderNum) {
        //设置dbParent
        DbVo dbParent=DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("be_date")
                .dbFieldTxt("开始时间")
                .dbType("Date")
                .dbLength(120)
                .dbIsNull(1)
                .build();
        PageVo pageVoParent=PageVo.builder()
                .isShowForm(1)
                .isReadOnly(0)
                .isQuery(0)
                .isShowList(1)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("date")
                .orderNum(orderNum)
                .build();
        ValidateVo validateParent=ValidateVo.builder()
                .fieldHref("")

                .build();
        ForeignKeyVo foreignKeyVoParent=ForeignKeyVo.builder()
                .build();
        IndexVo indexVocolumnParent=IndexVo.builder()
                .build();
        SearchVo searchVocolumnParent=SearchVo.builder()
                .build();

        ColumnVoDomain columnParent = ColumnVoDomain.builder()
                .dbVo(dbParent)
                .pageVo(pageVoParent)
                .validateVo(validateParent)
                .foreignKeyVo(foreignKeyVoParent)
                .indexVo(indexVocolumnParent)
                .searchVo(searchVocolumnParent)
                .build();
        singletable.getColumnVoDomainList().add(columnParent);
    }

    private static void set请假天数(TableVoDomain singletable, int orderNum) {
        //设置dbimage
        DbVo dbTypeName=DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("days")
                .dbFieldTxt("请假天数")
                .dbType("int")
                .dbLength(10)
                .dbIsNull(1)
                .build();
        PageVo pageVoTypeName=PageVo.builder()
                .isShowForm(1)
                .isReadOnly(0)
                .isQuery(0)
                .isShowList(1)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("text")
                .orderNum(orderNum)
                .build();
        ValidateVo validateTypeName=ValidateVo.builder()
                .fieldHref("")

                .build();
        ForeignKeyVo foreignKeyVoTypeName=ForeignKeyVo.builder()
                .build();
        IndexVo indexVocolumnTypeName=IndexVo.builder()
                .build();
        SearchVo searchVocolumnTypeName=SearchVo.builder()
                .build();

        ColumnVoDomain columnTypeName = ColumnVoDomain.builder()
                .dbVo(dbTypeName)
                .pageVo(pageVoTypeName)
                .validateVo(validateTypeName)
                .foreignKeyVo(foreignKeyVoTypeName)
                .indexVo(indexVocolumnTypeName)
                .searchVo(searchVocolumnTypeName)
                .build();
        singletable.getColumnVoDomainList().add(columnTypeName);
    }

    private static void set请假原因(TableVoDomain singletable, int orderNum) {
        //设置dbTypeName
        DbVo dbTypeName=DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("descc")
                .dbFieldTxt("请假原因")
                .dbType("string")
                .dbLength(1000)
                .dbIsNull(1)
                .build();
        PageVo pageVoTypeName=PageVo.builder()
                .isShowForm(1)
                .isReadOnly(0)
                .isQuery(0)
                .isShowList(1)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("text")
                .orderNum(orderNum)
                .build();
        ValidateVo validateTypeName=ValidateVo.builder()
                .fieldHref("")

                .build();
        ForeignKeyVo foreignKeyVoTypeName=ForeignKeyVo.builder()
                .build();
        IndexVo indexVocolumnTypeName=IndexVo.builder()
                .build();
        SearchVo searchVocolumnTypeName=SearchVo.builder()
                .build();

        ColumnVoDomain columnTypeName = ColumnVoDomain.builder()
                .dbVo(dbTypeName)
                .pageVo(pageVoTypeName)
                .validateVo(validateTypeName)
                .foreignKeyVo(foreignKeyVoTypeName)
                .indexVo(indexVocolumnTypeName)
                .searchVo(searchVocolumnTypeName)
                .build();
        singletable.getColumnVoDomainList().add(columnTypeName);
    }

    private static void set年龄(TableVoDomain singletable, int orderNum) {
        //设置dbimage
        DbVo dbTypeName=DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("age")
                .dbFieldTxt("年龄")
                .dbType("int")
                .dbLength(10)
                .dbIsNull(1)
                .build();
        PageVo pageVoTypeName=PageVo.builder()
                .isShowForm(1)
                .isReadOnly(0)
                .isQuery(0)
                .isShowList(1)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("text")
                .orderNum(orderNum)
                .build();
        ValidateVo validateTypeName=ValidateVo.builder()
                .fieldHref("")

                .build();
        ForeignKeyVo foreignKeyVoTypeName=ForeignKeyVo.builder()
                .build();
        IndexVo indexVocolumnTypeName=IndexVo.builder()
                .build();
        SearchVo searchVocolumnTypeName=SearchVo.builder()
                .build();

        ColumnVoDomain columnTypeName = ColumnVoDomain.builder()
                .dbVo(dbTypeName)
                .pageVo(pageVoTypeName)
                .validateVo(validateTypeName)
                .foreignKeyVo(foreignKeyVoTypeName)
                .indexVo(indexVocolumnTypeName)
                .searchVo(searchVocolumnTypeName)
                .build();
        singletable.getColumnVoDomainList().add(columnTypeName);
    }

    private static void set请假人(TableVoDomain singletable, int orderNum) {
        //设置dbTypeName
        DbVo dbTypeName=DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("name")
                .dbFieldTxt("请假人")
                .dbType("string")
                .dbLength(32)
                .dbIsNull(1)
                .build();
        PageVo pageVoTypeName=PageVo.builder()
                .isShowForm(1)
                .isReadOnly(0)
                .isQuery(1)
                .isShowList(1)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("text")
                .orderNum(orderNum)
                .build();
        ValidateVo validateTypeName=ValidateVo.builder()
                .fieldHref("")

                .build();
        ForeignKeyVo foreignKeyVoTypeName=ForeignKeyVo.builder()
                .build();
        IndexVo indexVocolumnTypeName=IndexVo.builder()
                .build();
        SearchVo searchVocolumnTypeName=SearchVo.builder()
                .build();

        ColumnVoDomain columnTypeName = ColumnVoDomain.builder()
                .dbVo(dbTypeName)
                .pageVo(pageVoTypeName)
                .validateVo(validateTypeName)
                .foreignKeyVo(foreignKeyVoTypeName)
                .indexVo(indexVocolumnTypeName)
                .searchVo(searchVocolumnTypeName)
                .build();
        singletable.getColumnVoDomainList().add(columnTypeName);
    }
    private static void set性别(TableVoDomain singletable, int orderNum) {
        //设置dbTypeName
        DbVo dbTypeName=DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("sex")
                .dbFieldTxt("性别")
                .dbType("string")
                .dbLength(32)
                .dbIsNull(1)
                .build();
        PageVo pageVoTypeName=PageVo.builder()
                .isShowForm(1)
                .isReadOnly(0)
                .isQuery(1)
                .isShowList(1)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("list")
                .orderNum(orderNum)
                .build();
        ValidateVo validateTypeName=ValidateVo.builder()
                .fieldHref("")
                .fieldMustInput("1")
                .dictField("sex")
                .build();
        ForeignKeyVo foreignKeyVoTypeName=ForeignKeyVo.builder()
                .build();
        IndexVo indexVocolumnTypeName=IndexVo.builder()
                .build();
        SearchVo searchVocolumnTypeName=SearchVo.builder()
                .build();

        ColumnVoDomain columnTypeName = ColumnVoDomain.builder()
                .dbVo(dbTypeName)
                .pageVo(pageVoTypeName)
                .validateVo(validateTypeName)
                .foreignKeyVo(foreignKeyVoTypeName)
                .indexVo(indexVocolumnTypeName)
                .searchVo(searchVocolumnTypeName)
                .build();
        singletable.getColumnVoDomainList().add(columnTypeName);
    }
    private static void setupproductintroduction(TableVoDomain singletable, int orderNum) {
        //设置dbHasChild字段
        DbVo dbParent=DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("contents")
                .dbFieldTxt("商品简介")
                .dbType("Text")
                .dbLength(120)
                .dbIsNull(1)
                .build();
        PageVo pageVoParent=PageVo.builder()
                .isShowForm(1)
                .isReadOnly(0)
                .isQuery(0)
                .isShowList(1)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("umeditor")
                .orderNum(orderNum)
                .build();
        ValidateVo validateParent=ValidateVo.builder()
                .fieldHref("")

                .build();
        ForeignKeyVo foreignKeyVoParent=ForeignKeyVo.builder()
                .build();
        IndexVo indexVocolumnParent=IndexVo.builder()
                .build();
        SearchVo searchVocolumnParent=SearchVo.builder()
                .build();

        ColumnVoDomain columnParent = ColumnVoDomain.builder()
                .dbVo(dbParent)
                .pageVo(pageVoParent)
                .validateVo(validateParent)
                .foreignKeyVo(foreignKeyVoParent)
                .indexVo(indexVocolumnParent)
                .searchVo(searchVocolumnParent)
                .build();
        singletable.getColumnVoDomainList().add(columnParent);
    }

    private static void setupoutfactoryDate(TableVoDomain singletable, int orderNum) {
        //设置dbParent
        DbVo dbParent=DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("chuc_date")
                .dbFieldTxt("出厂时间")
                .dbType("Date")
                .dbLength(120)
                .dbIsNull(1)
                .build();
        PageVo pageVoParent=PageVo.builder()
                .isShowForm(1)
                .isReadOnly(0)
                .isQuery(0)
                .isShowList(1)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("date")
                .orderNum(orderNum)
                .build();
        ValidateVo validateParent=ValidateVo.builder()
                .fieldHref("")

                .build();
        ForeignKeyVo foreignKeyVoParent=ForeignKeyVo.builder()
                .build();
        IndexVo indexVocolumnParent=IndexVo.builder()
                .build();
        SearchVo searchVocolumnParent=SearchVo.builder()
                .build();

        ColumnVoDomain columnParent = ColumnVoDomain.builder()
                .dbVo(dbParent)
                .pageVo(pageVoParent)
                .validateVo(validateParent)
                .foreignKeyVo(foreignKeyVoParent)
                .indexVo(indexVocolumnParent)
                .searchVo(searchVocolumnParent)
                .build();
        singletable.getColumnVoDomainList().add(columnParent);

    }

    private static void setupprice(TableVoDomain singletable, int orderNum) {
        //设置dbimage
        DbVo dbTypeName=DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("price")
                .dbFieldTxt("价格")
                .dbType("BigDecimal")
                .dbLength(120)
                .dbIsNull(1)
                .build();
        PageVo pageVoTypeName=PageVo.builder()
                .isShowForm(1)
                .isReadOnly(0)
                .isQuery(0)
                .isShowList(1)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("text")
                .orderNum(orderNum)
                .build();
        ValidateVo validateTypeName=ValidateVo.builder()
                .fieldHref("")

                .build();
        ForeignKeyVo foreignKeyVoTypeName=ForeignKeyVo.builder()
                .build();
        IndexVo indexVocolumnTypeName=IndexVo.builder()
                .build();
        SearchVo searchVocolumnTypeName=SearchVo.builder()
                .build();

        ColumnVoDomain columnTypeName = ColumnVoDomain.builder()
                .dbVo(dbTypeName)
                .pageVo(pageVoTypeName)
                .validateVo(validateTypeName)
                .foreignKeyVo(foreignKeyVoTypeName)
                .indexVo(indexVocolumnTypeName)
                .searchVo(searchVocolumnTypeName)
                .build();
        singletable.getColumnVoDomainList().add(columnTypeName);

    }

    private static void setupproductName(TableVoDomain singletable, int orderNum) {

        //设置dbTypeName
        DbVo dbTypeName=DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("name")
                .dbFieldTxt("商品名字")
                .dbType("string")
                .dbLength(120)
                .dbIsNull(1)
                .build();
        PageVo pageVoTypeName=PageVo.builder()
                .isShowForm(1)
                .isReadOnly(0)
                .isQuery(0)
                .isShowList(1)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("text")
                .orderNum(orderNum)
                .build();
        ValidateVo validateTypeName=ValidateVo.builder()
                .fieldHref("")

                .build();
        ForeignKeyVo foreignKeyVoTypeName=ForeignKeyVo.builder()
                .build();
        IndexVo indexVocolumnTypeName=IndexVo.builder()
                .build();
        SearchVo searchVocolumnTypeName=SearchVo.builder()
                .build();

        ColumnVoDomain columnTypeName = ColumnVoDomain.builder()
                .dbVo(dbTypeName)
                .pageVo(pageVoTypeName)
                .validateVo(validateTypeName)
                .foreignKeyVo(foreignKeyVoTypeName)
                .indexVo(indexVocolumnTypeName)
                .searchVo(searchVocolumnTypeName)
                .build();
        singletable.getColumnVoDomainList().add(columnTypeName);
    }
    //注意，字典的内容，没有写入进去
    private static void setupproductType(TableVoDomain singletable, int orderNum) {

        //设置dbTypeName
        DbVo dbTypeName=DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("good_type_id")
                .dbFieldTxt("商品分类")
                .dbType("string")
                .dbLength(120)
                .dbIsNull(1)
                .build();
        PageVo pageVoTypeName=PageVo.builder()
                .isShowForm(1)
                .isReadOnly(0)
                .isQuery(0)
                .isShowList(1)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("sel_tree")
                .orderNum(orderNum)
                .build();
        ValidateVo validateTypeName=ValidateVo.builder()
                .fieldHref("")
                .dictField("0")
                .dictTable("ces_shop_type")
                .dictText("id,pid,name,has_child")
                .build();
        ForeignKeyVo foreignKeyVoTypeName=ForeignKeyVo.builder()
                .build();
        IndexVo indexVocolumnTypeName=IndexVo.builder()
                .build();
        SearchVo searchVocolumnTypeName=SearchVo.builder()
                .build();

        ColumnVoDomain columnTypeName = ColumnVoDomain.builder()
                .dbVo(dbTypeName)
                .pageVo(pageVoTypeName)
                .validateVo(validateTypeName)
                .foreignKeyVo(foreignKeyVoTypeName)
                .indexVo(indexVocolumnTypeName)
                .searchVo(searchVocolumnTypeName)
                .build();
        singletable.getColumnVoDomainList().add(columnTypeName);
    }

    private static void setupSysorgCode(TableVoDomain singletable, int orderNum) {
        //设置id
        DbVo dbVosysorgcode = DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("sys_org_code")
                .dbFieldTxt("所属部门")
                .dbType("string")
                .dbLength(120)
                .dbIsNull(1)
                .dbLength(120)
                .build();
        PageVo pageVosysorgcode = PageVo.builder()
                .isShowForm(0)
                .isReadOnly(0)
                .isQuery(0)
                .isShowList(0)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("text")
                .orderNum(orderNum)
                .build();
        ValidateVo validateVosysorgcode = ValidateVo.builder()
                .fieldHref("")

                .build();
        ForeignKeyVo foreignKeyVosysorgcode = ForeignKeyVo.builder()
                .build();
        IndexVo indexVosysorgcode = IndexVo.builder()
                .build();
        SearchVo searchVosysorgcode = SearchVo.builder()
                .build();

        ColumnVoDomain columnId = ColumnVoDomain.builder()
                .dbVo(dbVosysorgcode)
                .pageVo(pageVosysorgcode)
                .validateVo(validateVosysorgcode)
                .foreignKeyVo(foreignKeyVosysorgcode)
                .indexVo(indexVosysorgcode)
                .searchVo(searchVosysorgcode)
                .build();

        singletable.getColumnVoDomainList().add(columnId);
    }

    private static void setpkid(TableVoDomain singletable, int orderNum) {
        //设置id
        DbVo dbVoid = DbVo.builder()
                .dbIsKey(1)
                .dbFieldName("id")
                .dbFieldTxt("主键")
                .dbType("string")
                .dbLength(120)
                .dbIsNull(0)
                .dbLength(120)
                .build();
        PageVo pageVoid = PageVo.builder()
                .isShowForm(0)
                .isReadOnly(1)
                .isQuery(0)
                .isShowList(0)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("text")
                .orderNum(1)
                .build();
        ValidateVo validateVoid = ValidateVo.builder()
                .fieldHref("")
                //.dictField("")
                //.dictTable("")
                //.dictText("")
                .build();
        ForeignKeyVo foreignKeyVo = ForeignKeyVo.builder()
                .build();
        IndexVo indexVo = IndexVo.builder()
                .build();
        SearchVo searchVo = SearchVo.builder()
                .build();

        ColumnVoDomain columnId = ColumnVoDomain.builder()
                .dbVo(dbVoid)
                .pageVo(pageVoid)
                .validateVo(validateVoid)
                .foreignKeyVo(foreignKeyVo)
                .indexVo(indexVo)
                .searchVo(searchVo)
                .build();

        singletable.getColumnVoDomainList().add(columnId);
    }
    private static void setcreateby(TableVoDomain singletable, int orderNum) {
        //设置create_by
        DbVo dbcreateby= DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("create_by")
                .dbFieldTxt("创建人")
                .dbType("string")
                .dbLength(120)
                .dbIsNull(1)
                .dbLength(120)
                .build();
        PageVo pageVocreateby=PageVo.builder()
                .isShowForm(0)
                .isReadOnly(0)
                .isQuery(0)
                .isShowList(0)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("text")
                .orderNum(2)
                .build();
        ValidateVo validatecreateby=ValidateVo.builder()
                .fieldHref("")

                .build();
        ForeignKeyVo foreignKeyVocreateby=ForeignKeyVo.builder()
                .build();
        IndexVo indexVocreateby=IndexVo.builder()
                .build();
        SearchVo searchVocreateby=SearchVo.builder()
                .build();

        ColumnVoDomain columncreateby = ColumnVoDomain.builder()
                .dbVo(dbcreateby)
                .pageVo(pageVocreateby)
                .validateVo(validatecreateby)
                .foreignKeyVo(foreignKeyVocreateby)
                .indexVo(indexVocreateby)
                .searchVo(searchVocreateby)
                .build();
        singletable.getColumnVoDomainList().add(columncreateby);


    }

    private static void setUpdatetime(TableVoDomain singletable, int orderNum) {
        //设置upTime
        DbVo dbupTime=DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("update_time")
                .dbFieldTxt("更新日期")
                .dbType("Date")
                .dbLength(120)
                .dbIsNull(1)
                .dbLength(120)
                .build();
        PageVo pageVoupTime=PageVo.builder()
                .isShowForm(0)
                .isReadOnly(0)
                .isQuery(0)
                .isShowList(0)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("datetime")
                .orderNum(orderNum)
                .build();
        ValidateVo validateupTime=ValidateVo.builder()
                .fieldHref("")

                .build();
        ForeignKeyVo foreignKeyVoupTime=ForeignKeyVo.builder()
                .build();
        IndexVo indexVoupTime=IndexVo.builder()
                .build();
        SearchVo searchVoupTime=SearchVo.builder()
                .build();

        ColumnVoDomain columnupTime = ColumnVoDomain.builder()
                .dbVo(dbupTime)
                .pageVo(pageVoupTime)
                .validateVo(validateupTime)
                .foreignKeyVo(foreignKeyVoupTime)
                .indexVo(indexVoupTime)
                .searchVo(searchVoupTime)
                .build();
        singletable.getColumnVoDomainList().add(columnupTime);
    }

    private static void setUpdateBy(TableVoDomain singletable, int orderNum) {
        //设置create_Time
        DbVo dbUpdateBy=DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("update_by")
                .dbFieldTxt("更新人")
                .dbType("string")
                .dbLength(120)
                .dbIsNull(1)
                .build();
        PageVo pageVoUpdateBy=PageVo.builder()
                .isShowForm(0)
                .isReadOnly(0)
                .isQuery(0)
                .isShowList(0)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("text")
                .orderNum(orderNum)
                .build();
        ValidateVo validateUpdateBy=ValidateVo.builder()
                .fieldHref("")

                .build();
        ForeignKeyVo foreignKeyVoUpdateBy=ForeignKeyVo.builder()
                .build();
        IndexVo indexVoUpdateBy=IndexVo.builder()
                .build();
        SearchVo searchVoUpdateBy=SearchVo.builder()
                .build();

        ColumnVoDomain columnUpdateBy = ColumnVoDomain.builder()
                .dbVo(dbUpdateBy)
                .pageVo(pageVoUpdateBy)
                .validateVo(validateUpdateBy)
                .foreignKeyVo(foreignKeyVoUpdateBy)
                .indexVo(indexVoUpdateBy)
                .searchVo(searchVoUpdateBy)
                .build();
        singletable.getColumnVoDomainList().add(columnUpdateBy);
    }

    private static void setCreatTime(TableVoDomain singletable,Integer orderNum) {
        //设置create_Time
        DbVo dbcreateTime=DbVo.builder()
                .dbIsKey(0)
                .dbFieldName("create_time")
                .dbFieldTxt("创建日期")
                .dbType("Date")
                .dbLength(120)
                .dbIsNull(1)
                .dbLength(120)
                .build();
        PageVo pageVocreateTime=PageVo.builder()
                .isShowForm(0)
                .isReadOnly(0)
                .isQuery(0)
                .isShowList(0)
                .queryMode("single")
                .sortFlag("N")
                .fieldShowType("datetime")
                .orderNum(orderNum)
                .build();
        ValidateVo validatecreateTime=ValidateVo.builder()
                .fieldHref("")

                .build();
        ForeignKeyVo foreignKeyVocreateTime=ForeignKeyVo.builder()
                .build();
        IndexVo indexVocreateTime=IndexVo.builder()
                .build();
        SearchVo searchVocreateTime=SearchVo.builder()
                .build();

        ColumnVoDomain columncreateTime = ColumnVoDomain.builder()
                .dbVo(dbcreateTime)
                .pageVo(pageVocreateTime)
                .validateVo(validatecreateTime)
                .foreignKeyVo(foreignKeyVocreateTime)
                .indexVo(indexVocreateTime)
                .searchVo(searchVocreateTime)
                .build();
        singletable.getColumnVoDomainList().add(columncreateTime);
    }


}
